﻿using System;
using System.Collections.Generic;
using System.IO;

namespace Synology.AudioStationApi
{
    public interface IAudioStationSession
    {
        event AudioStationSession.LoginCompletedEventHandler LoginCompleted;
        string Login(string login, string password);
        void LoginAsync(string login, string password, object[] arguments);
        IAsyncResult SearchAsync(string query, QueryType queryType);
        event AudioStationSession.SearchAsyncCompletedEventHandler SearchAsyncCompleted;

        /// <summary>
        /// Gets the remote file network stream.
        /// </summary>
        /// <param name="res">The "res" for the file, that is : the songpath.</param>
        /// <param name="stream">The stream.</param>
        /// <remarks>The caller is responsible for closing the stream after the call to DownloadFile returns</remarks>
        void GetFileStream(string res, out Stream stream);

        void LoginAsync(string login, string password);
        void Search();
        IEnumerable<SynoItem> Browse(string itemID);
    }
}